//package org.hxyjs.controller;
//
//import org.hxyjs.dto.DTO;
//import org.hxyjs.entity.ExpertActivityRecord;
//import org.hxyjs.page.PageInfo;
//import org.hxyjs.service.ExpertActivityRecordService;
//import org.hxyjs.vo.ExpertActivityRecordView;
//import org.springframework.cloud.openfeign.SpringQueryMap;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource;
//
//@CrossOrigin
//@Controller //@Controller注解是用spring容器生成 对象 默认对象名 expertActivityRecordController
////@RequestMapping("/expertActivityRecordController") //@RequestMapping 用户请求查找该资源使用的名字 网名 默认  /expertActivityRecordController
//public class ExpertActivityRecordController {
//	@Resource
//    ExpertActivityRecordService expertActivityRecordService;
//
//	@GetMapping("/expertActivityRecords")
//	@ResponseBody //把方法的返回值按json转换之后 输出到浏览器
//    public DTO<ExpertActivityRecord> getAllExpertActivityRecord() throws Exception{
//    	System.out.println("查询全部专家");
//    	return expertActivityRecordService.getAllExpertActivityRecords();
//    }
//
//	@PostMapping("/expertActivityRecord")
//	@ResponseBody
//	public DTO<ExpertActivityRecord> addExpertActivityRecord(@RequestBody ExpertActivityRecord expertActivityRecord) throws Exception{//如何从页面传入参数到方法 用这个注解绑定变量@PathVariable
//		System.out.println("增加专家成功");
//		return expertActivityRecordService.addExpertActivityRecord(expertActivityRecord);
//	}
//	@DeleteMapping("/expertActivityRecord/{exarno}")
//	@ResponseBody
//    public DTO<ExpertActivityRecord> deleteExpertActivityRecordByExarno(@RequestBody @PathVariable("exarno") String exarno) throws Exception{//如何从页面传入参数到方法 用这个注解绑定变量@PathVariable
//    	System.out.println(exarno+"删除专家成功");
//    	return expertActivityRecordService.deleteExpertActivityRecordByExarno(exarno);
//    }
//
//	@GetMapping("/expertActivityRecord/{exarno}")
//	@ResponseBody
//	public DTO<ExpertActivityRecord> getExpertActivityRecordByExarno(@PathVariable("exarno") String exarno) throws Exception{//如何从页面传入参数到方法 用这个注解绑定变量@PathVariable
//		System.out.println(exarno+"根据主键查询专家成功");
//		return expertActivityRecordService.getExpertActivityRecordByExarno(exarno);
//	}
//
//	@PatchMapping("/expertActivityRecord")
//	@ResponseBody
//	public DTO<ExpertActivityRecord> updateExpertActivityRecordByExarno(@RequestBody ExpertActivityRecordView expertActivityRecordView) throws Exception{//如何从页面传入参数到方法 用这个注解绑定变量@PathVariable
//		System.out.println("修改专家成功");
//		System.out.println(expertActivityRecordView);
//		return expertActivityRecordService.updateExpertActivityRecordByExarno(expertActivityRecordView);
//	}
//
//	@RequestMapping("/expertActivityRecords/pageInfo")
//	@ResponseBody
//	public DTO<ExpertActivityRecord> getExpertActivityRecordByPage(@SpringQueryMap PageInfo pageInfo) throws Exception{//如何从页面传入参数到方法 用这个注解绑定变量@PathVariable
//		System.out.println("查询分页");
//		return expertActivityRecordService.getExpertActivityRecordByPage(pageInfo);
//	}
//
//}
